package homework;

import java.io.*;

/**
 * @classname:demo03
 * @description:
 * @author: Mr.Z
 * @date: 2020/12/17 19:04
 * @version: 0.1
 * @since:1.8
 */
public class demo03 {
    public static void main(String[] args) {
        outputString("day16\\src\\dis\\log.txt");
    }

    private static void outputString(String path) {
        //用IO读取从控制台
        try(
                BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
                BufferedWriter writer = new BufferedWriter(new FileWriter(path))
                ){
            String str = "";
            while (!(str=reader.readLine()).equals("bye")){
                writer.write(str);
                writer.newLine();
            }

        } catch (IOException e) {
            e.printStackTrace();
        }


    }
}
